package com.zhisuo.apicenter.model;

import org.springframework.jdbc.core.RowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;

public class SendOrderRowMapper implements RowMapper<SendOrder> {

    @Override
    public SendOrder mapRow(ResultSet rs, int rowNum) throws SQLException {
        SendOrder sendOrder = new SendOrder();
        sendOrder.setId(rs.getInt("id"));
        sendOrder.setUserid(rs.getInt("userid"));
        sendOrder.setCarid(rs.getInt("carid"));
        sendOrder.setBoxnum(rs.getInt("boxnum"));
        sendOrder.setBoxid(rs.getInt("boxid"));
        sendOrder.setBoxcode(rs.getString("boxcode"));
        sendOrder.setPaymentcode(rs.getString("paymentcode"));
        sendOrder.setPaymentcompany(rs.getString("paymentcompany"));
        sendOrder.setSendmobile(rs.getString("sendmobile"));
        sendOrder.setCreate_time(rs.getTimestamp("create_time"));
        sendOrder.setStatus(rs.getInt("status"));
        sendOrder.setSenduseraddresscode(rs.getString("senduseraddresscode"));
        sendOrder.setSenduseraddressid(rs.getInt("senduseraddressid"));
        sendOrder.setSenduserorderstarttime(rs.getTimestamp("senduserorderstarttime"));
        sendOrder.setSenduserorderendtime(rs.getTimestamp("senduserorderendtime"));
        sendOrder.setSendcode(rs.getString("sendcode"));
        sendOrder.setSendcodeuserid(rs.getString("sendcodeuserid"));
        sendOrder.setSend_time(rs.getTimestamp("send_time"));
        return sendOrder;
    }

}
